package com.zmzncs.lmtc.module.shop.dao;

import com.zmzncs.lmtc.module.shop.pojo.shop_goods.ShopGoods;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zmzncs.lmtc.module.shop.pojo.shop_goods.ShopGoodsDTO;
import com.zmzncs.lmtc.module.shop.pojo.shop_info.ShopInfoDTO;
import com.zmzncs.lmtc.module.shop.pojo.shop_ticket.ShopTicketDTO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 商户-商品 Mapper 接口
 * </p>
 *
 * @author 高博文
 * @since 2021-05-20
 */
@Repository
public interface ShopGoodsMapper extends BaseMapper<ShopGoods> {
    /**获取附近商家列表*/
    List<ShopGoodsDTO> getNearShopGoods(String longitude, String latitude);

    /**
     * 获取商户的商品列表
     */
    List<ShopGoodsDTO>  getShopGoodsListByShopInfo(Long shopInfoId);

    /**
     * 获取商户的优惠券列表
     */
    List<ShopTicketDTO>  getShopTicketListByShopInfo(@Param("shopInfoId") Long shopInfoId);

    /**详情*/
    ShopGoodsDTO getById(Long id);

}
